#/*************************************************************************
#    > File Name: calc/calc_setting.py
#    > Author: Yan Wang
#    > Mail: wangyan@imnu.edu.cn
#    > Created Time: 2022年07月21日 星期四 14时31分39秒
# ************************************************************************/
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from Library import *
from Load_Lib import * 

sys.path.append('../Lib')
# 设置print的显示规则
np.set_printoptions(threshold=np.inf)
pd.set_option('display.max_columns',None)
pd.set_option('display.max_rows',None)

# 设置基本的工作路径
#work_cluster="college"
work_cluster="PC"
scan_method = "pbs"
#mg_event_method = "slurm"
#mg_event_method = "seperate"
#mg_event_method = "scan"

if work_cluster == "college":
	work_dir="/public/home/yancy/Code/Git/np_param_scan/"
	THDMC_dir="/public/home/yancy/Software/bin/HiggsRelated/2HDMC-1.8.0_hbmodified"
	node_name=["node1","node2", "node3","node4","node5","node6","node7","node8","node9","node10","node11","node12"]
elif work_cluster == "yancy":
	work_dir= "/home/yancy/Code/Git/np_param_scan/"
	THDMC_dir="/home/yancy/Software/bin/HiggsRelated/2HDMC-1.8.0_hbmodified"
	node_name=["node1", "node2","gpu"]
elif work_cluster == "PC":
	work_dir= "/home/yancywww/Code/Git/np_param_scan/"
	THDMC_dir="/home/yancywww/Software/bin/HiggsRelated/2HDMC"
	node_name=["node1", "node2","gpu"]
node_num=len(node_name) 



# 设置基本参数

process="THDM_scan"

# 设置 2HDMC数据参数
THDMC_SCAN_PROGRAM = "single_point"
param_output_file= "../output/1_param_output.dat"
hbhs_output_file= "../output/2_hbhs_output.dat"
log_file = "../log/log.dat"
totnum  = "1"


#os.system("python Param_Generation.py --param-output-file=%s --hbhs-output-file=%s --totnum=%s" % (param_output_file, hbhs_output_file, totnum) )

param_df=Load_THDM_Param(param_output_file)
param_length=len(param_df)


## 设置集群节点参数，用于并行计算
if scan_method == "scan" or "slurm" or "pbs":
	folder_num=node_num
else:
	print("please add correct mg_event_method, and rerun the code. The current value is ", scan_method)
	exit(0)


# 设置 2HDMC 相关参数，利用ARCH输出结果

#summary_folder= process_output_folder+"/BASDA_para_{event}".format(event=process_event_kind)
#hotmap_out_file=process_output_folder+"/xection/{fname}_for_ARCH_xection.dat".format(fname=process_event_kind)
#hotmap_variable_name="ARCH_xection"
#hotmap_file_name=process_output_folder+"/hotmap/{fname}_for_ARCH_xection.C".format(fname=process_event_kind)
#param_out_file=process_output_folder+"/param/{fname}_for_ARCH.dat".format(fname=process_event_kind)
